<?php

use App\Message;
use Illuminate\Database\Seeder;

class MessagesTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $datas = [
            [
                'pull_id' => rand(1, 10),
                'post_id' => rand(1, 20),
                'push_id' => rand(1, 10),
                'status' => 0,
                'read' => rand(0, 1),
                'msg' => '用户 *** 赞了你',
            ],
            [
                'pull_id' => rand(1, 10),
                'post_id' => rand(1, 20),
                'push_id' => rand(1, 10),
                'status' => 0,
                'read' => rand(0, 1),
                'msg' => '用户 *** 赞了你',
            ],
            [
                'pull_id' => rand(1, 10),
                'post_id' => rand(1, 20),
                'push_id' => 0,
                'status' => 1,
                'read' => rand(0, 1),
                'msg' => '由于你的文章 **** 被赞次数超过 30 次,你的积分增加了 2 分',
            ],
            [
                'pull_id' => rand(1, 10),
                'post_id' => rand(1, 20),
                'push_id' => 0,
                'status' => 1,
                'read' => rand(0, 1),
                'msg' => '由于你的文章 **** 被浏览次数超过 30 次,你的积分增加了 2 分',
            ],
            [
                'pull_id' => rand(1, 10),
                'post_id' => rand(1, 20),
                'push_id' => 0,
                'status' => 2,
                'read' => rand(0, 1),
                'msg' => '你的文章 **** 审核不通过',
            ],
            [
                'pull_id' => rand(1, 10),
                'post_id' => rand(1, 20),
                'push_id' => 0,
                'status' => 2,
                'read' => rand(0, 1),
                'msg' => '你的文章 **** 审核通过',
            ],
            [
                'pull_id' => rand(1, 10),
                'post_id' => rand(1, 20),
                'push_id' => rand(1, 10),
                'status' => 3,
                'read' => rand(0, 1),
                'msg' => '用户 *** 给你反馈',
            ],
            [
                'pull_id' => rand(1, 10),
                'post_id' => rand(1, 20),
                'push_id' => rand(1, 10),
                'status' => 3,
                'read' => rand(0, 1),
                'msg' => '用户 *** 给你反馈',
            ],
        ];

        DB::table('messages')->insert($datas);
    }
}
